<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="css" file="css.form" />
<import type="css" file="css.global" />
<import type="js" file="js.common" />
<script Language="JavaScript">
function CheckForm()
{
   if(document.form1.supplies_name.value=="")
   { alert("请填写物品名称！");
     return (false);
   }
   if(document.form1.unit.value=="")
   { alert("请填写物品单位！");
     return (false);
   }
   if(document.form1.unit_price.value=="")
   { alert("请填写物品单价！");
     return (false);
   }
   var min_number = document.form1.min_number.value;
   if(min_number=="")
   { alert("请填写物品最低库存！");
     return (false);
   }else{
	   var reg = /^[1-9]\d*$/;
	   if(!reg.test(min_number)){
		   alert('最低库存只能为数字！');
		   return false;
	   }
   }
	
}
</script>
</head>

<body>
<div class="search"><b>修改办公物品信息</b></div>
<div id="form">
	<form action="__APP__/Administrative/supplies_save"  method="post" name="form1" onsubmit="return CheckForm();">
		<table>
		 <tr>
			<td class="titlename">物品名称：</td>
			<td>
				<input type="text" name="supplies_name" value="{$data.supplies_name}">&nbsp;
			</td>
		 </tr>
		 <tr>
			<td class="titlename">物品规格：</td>
			<td>
				<input type="text" name="specification" value="{$data.specification}">&nbsp;
			</td>
		 </tr>
		 <tr>
			<td class="titlename">单位：</td>
			<td>
				<input type="text" name="unit" value="{$data.unit}" >&nbsp;
			</td>
		 </tr>
		 <tr>
			<td class="titlename">单价：</td>
			<td>
				<input type="text" name="unit_price" value="{$data.unit_price}">&nbsp;
			</td>
		 </tr>
		 <tr>
			<td class="titlename">最低库存：</td>
			<td>
				<input type="text" name="min_number" value="{$data.min_number}" >&nbsp;
			</td>
		 </tr>
		 <tr>
			<td class="titlename"></td>
			<td>
				<input type="hidden" name="id" value="{$data.id}" >
				<input type="submit" value="保存" class="submit">&nbsp;&nbsp;
				<input type="button" value="返回" class="button" onclick="back()">
			</td>
		  </tr>
		</table>
	</form>
</div>
</body>
</html>